Ajax.loadLanguage   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
crap 1
1
import Loader from '../Loader';
2
3
export default class Ajax implements Loader {
4
  async loadLanguage(languageCode: string): Promise<any> {
5 1
    const response = await fetch('./I18n/' + languageCode + '.json');
6
7 1
    return response.json();
8
  }
9
}